const mysql = require("mysql");

//方式一
//创建连接池可以直接连接 实现多个连接
const db = mysql.createPool({
  host: "localhost",
  user: "root",
  password: "123456",
  database: "books",
});

module.exports = db;
